@mixin covalent-highlight-theme($theme) {
  $foreground: map-get($theme, foreground);
  $background: map-get($theme, background);
  $is-dark: map-get($theme, is-dark);

  .raw-and-copy-buttons {
    border-color: map-get($foreground, divider);

    .mat-button-toggle {
      background-color: inherit;
      color: map-get($foreground, text);

      & + .mat-button-toggle {
        border-left-color: map-get($foreground, divider);
      }
    }
  }

  .copy-button,
  .raw-and-copy-buttons {
    mat-icon {
      color: map-get($foreground, icon);
    }
  }

  td-highlight {
    background-color: if($is-dark, #1a1c1d, #eeeeee);

    .highlight {
      color: if($is-dark, #abb2bf, #383a42);
    }

    .raw {
      color: if($is-dark, rgba(255, 255, 255, 87%), rgba(0, 0, 0, 87%));
    }

    .hljs-comment,
    .hljs-quote {
      color: if($is-dark, #5c6370, #a0a1a7);
      font-style: italic;
    }

    .hljs-doctag,
    .hljs-formula,
    .hljs-keyword {
      color: if($is-dark, #c678dd, #a626a4);
    }

    .hljs-deletion,
    .hljs-name,
    .hljs-tag,
    .hljs-section,
    .hljs-selector-tag,
    .hljs-subst {
      color: if($is-dark, #e06c75, #e45649);
    }

    .hljs-literal {
      color: if($is-dark, #56b6c2, #0184bb);
    }

    .hljs-addition,
    .hljs-attribute,
    .hljs-meta .hljs-string,
    .hljs-regexp,
    .hljs-string {
      color: if($is-dark, #98c379, #50a14f);
    }

    .hljs-attr,
    .hljs-number,
    .hljs-selector-attr,
    .hljs-selector-class,
    .hljs-selector-pseudo,
    .hljs-template-variable,
    .hljs-type,
    .hljs-variable {
      color: if($is-dark, #d19a66, #986801);
    }

    .hljs-bullet,
    .hljs-link,
    .hljs-meta,
    .hljs-selector-id,
    .hljs-symbol,
    .hljs-title {
      color: if($is-dark, #61aeee, #4078f2);
    }

    .hljs-built_in,
    .hljs-class .hljs-title,
    .hljs-title.class_ {
      color: if($is-dark, #e6c07b, #c18401);
    }
  }
}
